<template>

   <div>
        <el-form :model="form">
          <el-form-item label="">
              <el-input v-model="form.key" placeholder="" style="width:200px;" size="small"></el-input>
              <el-button type="primary" size="small" @click="search">搜索</el-button>
          </el-form-item>
        </el-form>
   </div>

</template>

<script>
export default {
   data(){
       return {
          form:{},
       }
   },
   methods:{
       search(){
           //搜索
           //搜索结束获取了一组数据， 现在要传递给父组件
           let data=[{"name":"hello","age":22},{"name":"流量","age":18}]
           this.$emit("getData",data)

       }
   },
   created(){

   }
}
</script>

<style>
.el-form{
    width:300px;
    float: right;
}
</style>